Module-level declarations
Types
Link copied to clipboard
entity farming_block
Link copied to clipboard
struct farming_block_dto
Link copied to clipboard
struct farming_cell_action_dto
Link copied to clipboard
struct farming_cell_dto
Link copied to clipboard
object farming_config
Link copied to clipboard
struct farming_plot_action_dto
Link copied to clipboard
enum farming_state
Link copied to clipboard
Link copied to clipboard
struct merge_candidates
Link copied to clipboard
enum merge_list_strategy
Link copied to clipboard
struct module_args
Link copied to clipboard
entity player_sing
Link copied to clipboard
entity recent_produce
Link copied to clipboard
entity resulting_seed
Link copied to clipboard
entity seed_ownership
Link copied to clipboard
struct seed_type_dto
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function _create_or_update_seed_ownership(account_id: byte_array, plot_id: integer, cells: list<farming_cell_dto>)
Link copied to clipboard
function _remove_seed_ownership_on_plot(plot_id: integer, owners: list<seed_ownership>, seed_to_remove: farming_cell_dto)
Link copied to clipboard
function _reward_reverted_seeds_to_account(farming_cells: list<farming_cell_dto>, owner_account_id: byte_array)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function add_reward_produce(farming_cell_dto: farming_cell_dto, rewards: map<item, integer>, seed_type: seed_type, possible_seed_rewards: set<text>, action_index: integer)
Link copied to clipboard
function attempt_merge_for_cells(farming_cell_dto: farming_cell_dto, merge_candidates: merge_candidates, cells_map: map<location, farming_cell_dto>): boolean
Link copied to clipboard
function cache_transformations(farming_plot_action_dto: farming_plot_action_dto): (map<text, list<text>>, set<text>)
Link copied to clipboard
function check_heights_and_attempt_merge(plot: instance, cell: farming_cell_dto, cells_map: map<location, farming_cell_dto>, location: location, merge_candidates: merge_candidates): boolean
Link copied to clipboard
function check_merge_candidates_on_the_same_heights(plot: instance, location: location, merge_candidates: merge_candidates): boolean
Link copied to clipboard
Link copied to clipboard
function check_sing_possibility(plot_id: integer, account_id: byte_array, locations: set<location>, current_time: integer)
Link copied to clipboard
Link copied to clipboard
@extend(clear_grid_area) function clear_farmed_cells(cells_to_clear: set<location>, plot_id: integer)
Link copied to clipboard
Link copied to clipboard
function decrease_farming_tool_durability(account_id: byte_array, farming_cell_action_dto: farming_cell_action_dto, required_category: tool_category, durability_cost: integer)
Link copied to clipboard
function delete_and_update_seed_type(produce_id: text, growing_cycles: integer, harvest_amount: integer, fertility_extra_produce: integer, merged_crop_extra_produce: integer, planting_durability_cost: integer, watering_durability_cost: integer, harvesting_durability_cost: integer, time_per_growth_cycle: integer, seed: seed_type)
Link copied to clipboard
Link copied to clipboard
function figure_merged_crops(plot_id: integer, just_planted_cells: list<location>, cells_map: map<location, farming_cell_dto>)
Link copied to clipboard
Link copied to clipboard
function get_cells_for_blocks(blocks: set<farming_block>, timestamp: integer): (list<farming_cell_dto>, map<text, seed_type>)
Link copied to clipboard
Link copied to clipboard
function get_harvest_action_candidates(farming_plot_action_dto: farming_plot_action_dto, cells_map: map<location, farming_cell_dto>): list<location>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function includes_category(farming_cell_action_dto: farming_cell_action_dto, category: tool_category): boolean
Link copied to clipboard
function includes_only_categories(farming_cell_action_dto: farming_cell_action_dto, categories: list<tool_category>): boolean
Link copied to clipboard
function includes_only_category(farming_cell_action_dto: farming_cell_action_dto, category: tool_category): boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function is_planting(farming_cell_dto: farming_cell_dto, farming_cell_action_dto: farming_cell_action_dto): boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function merge_crops(plot_id: integer, just_planted_cells: list<location>, cells_map: map<location, farming_cell_dto>)
Link copied to clipboard
function merge_crops_nop(just_planted_cells: list<location>, cells_map: map<location, farming_cell_dto>): list<location>
Link copied to clipboard
function merge_crops_random(just_planted_cells: list<location>, cells_map: map<location, farming_cell_dto>): list<location>
Link copied to clipboard
@extend(on_renter_removed) function on_renter_removed_cleanup(account_id: byte_array, plot_id: integer)
Link copied to clipboard
@extend(on_sharee_removed) function on_sharee_removed_cleanup(account_id: byte_array, plot_id: integer)
Link copied to clipboard
Link copied to clipboard
function plant_on_cell(account_id: byte_array, farming_cell_dto: farming_cell_dto, farming_cell_action_dto: farming_cell_action_dto, assets_to_charge: map<text, integer>, seeds_map: map<text, seed_type>, transformations_map: map<text, list<text>>, action_index: integer, timestamp: integer)
Link copied to clipboard
Link copied to clipboard
function process_merged_crops(farming_plot_action_dto: farming_plot_action_dto, cells_map: map<location, farming_cell_dto>, seeds_map: map<text, seed_type>, rewards: map<item, integer>)
Link copied to clipboard
Link copied to clipboard
function query_blocks_for_locations_greedily(plot_id: integer, locations: set<location>): set<farming_block>
Link copied to clipboard
function query_blocks_for_locations_greedily_with_ownership(account_id: byte_array, plot_id: integer, locations: set<location>): set<farming_block>
Link copied to clipboard
Link copied to clipboard
function query_blocks_strictly_for_area(plot_id: integer, from: location, to: location): set<farming_block>
Link copied to clipboard
function register_seed(seed_name: text, produce_id: text, growing_cycles: integer, harvest_amount: integer, fertility_extra_produce: integer, merged_crop_extra_produce: integer, planting_durability_cost: integer, watering_durability_cost: integer, harvesting_durability_cost: integer, time_per_growth_cycle: integer)
Link copied to clipboard
Link copied to clipboard
@extend(require_occupancy_based_on_locations) function require_occupancy_based_on_locations(griddable: instance, locations: set<location>, optional_params: map<text, byte_array>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function sing_on_plot_with_time(plot_id: integer, current_cell: location, flute: text, account_id: byte_array, auth_descriptor_id: byte_array, current_time: integer)
Link copied to clipboard
function unmerge_crop(removed_cell: farming_cell_dto, cells_map: map<location, farming_cell_dto>, just_planted_cells: list<farming_cell_dto>)
Link copied to clipboard
function update_planted_cell(account_id: byte_array, plot_id: integer, cell: farming_cell_dto, farming_cell_action_dto: farming_cell_action_dto, seed_type: seed_type, rewards: map<item, integer>, cells_map: map<location, farming_cell_dto>, just_planted_cells: list<farming_cell_dto>, possible_seed_rewards: set<text>, action_index: integer, timestamp: integer, plot_seed_ownerships: list<seed_ownership>)
Link copied to clipboard
function update_state_for_batch(farming_plot_action_dto: farming_plot_action_dto, player: player, timestamp: integer, fertility_rate: integer)
Link copied to clipboard
function update_state_for_cell(farming_cell_action_dto: farming_cell_action_dto, player: player, assets_to_charge: map<text, integer>, rewards: map<item, integer>, cells_map: map<location, farming_cell_dto>, seeds_map: map<text, seed_type>, transformations_map: map<text, list<text>>, possible_seed_rewards: set<text>, action_index: integer, timestamp: integer, epoch_days: integer, plot_id: integer, fertility_rate: integer, just_planted_cells: list<farming_cell_dto>, plot_seed_ownerships: list<seed_ownership>)
Link copied to clipboard
function update_state_with_time(farming_plot_action_dto: farming_plot_action_dto, account_id: byte_array, auth_descriptor_id: byte_array, timestamp: integer)
Link copied to clipboard
function update_watered_cells(account_id: byte_array, cells: list<(farming_cell_dto, farming_cell_action_dto)>, seeds_map: map<text, seed_type>, timestamp: integer)
Link copied to clipboard
function update_watered_plants(account_id: byte_array, plot_id: integer, current_time: integer, cell_actions: list<farming_cell_action_dto>)
Link copied to clipboard
Queries
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@mount("farming.get_farming_configs")
query get_farming_configs(): (enabled: boolean, grace_period_in_millis: integer, fertility_decision_strategy: fertility_decision_strategy, merge_list_strategy: merge_list_strategy, singing_area: integer, singing_cycle_in_millis: integer, singing_limit_by_day: integer, singing_limit_by_plot: integer, singing_durability_cost: integer, tilling_durability_cost: integer)
Link copied to clipboard
@mount("farming.get_recent_produce")
query get_recent_produce(account_id: byte_array): list<(name: text, type: text, amount: integer)>
Link copied to clipboard
@mount("farming.get_sung_amount_in_cycle")
query get_sung_amount_in_cycle(account_id: byte_array): integer
Link copied to clipboard
@mount("farming.get_sung_on_plot_in_cycle")
query get_sung_on_plot_in_cycle(account_id: byte_array, plot_id: integer): integer
Link copied to clipboard
@mount("farming.state_at_locations")
query state_at_locations(plot_id: integer, locations: list<location>): list<farming_cell_dto>
Link copied to clipboard
Link copied to clipboard
@mount("farming.state_at_plot_on")
query state_at_plot_on(plot_id: integer, timestamp: integer): list<farming_cell_dto>
Operations
Link copied to clipboard
Link copied to clipboard
@mount("farming.register_seed_transformation")
operation register_seed_transformation(initial: text, results: list<text>)
Link copied to clipboard
@mount("farming.register_seed_type")
operation register_seed_type(seed_name: text, produce_id: text, growing_cycles: integer, harvest_amount: integer, fertility_extra_produce: integer, merged_crop_extra_produce: integer, planting_durability_cost: integer, watering_durability_cost: integer, harvesting_durability_cost: integer, price: integer, time_per_growth_cycle: integer)
Link copied to clipboard
Link copied to clipboard
@mount("farming.set_global_farming_parameters")
operation set_global_farming_parameters(enabled: boolean, grace_period_in_millis: integer)
Link copied to clipboard
@mount("farming.set_global_singing_parameters")
operation set_global_singing_parameters(singing_cycle_in_millis: integer, singing_area: integer, singing_limit_by_day: integer, singing_limit_by_plot: integer)
Link copied to clipboard
@mount("farming.set_singing_durability_cost")
operation set_singing_durability_cost(durability_cost: integer)
Link copied to clipboard
@mount("farming.set_tilling_durability_cost")
operation set_tilling_durability_cost(durability_cost: integer)
Link copied to clipboard
@mount("farming.sing")
operation sing(plot_id: integer, cell: location, flute: text, account_id: byte_array, auth_descriptor_id: byte_array)
Link copied to clipboard
@mount("farming.update_seed_type")
operation update_seed_type(seed_name: text, produce_id: text, growing_cycles: integer, harvest_amount: integer, fertility_extra_produce: integer, merged_crop_extra_produce: integer, planting_durability_cost: integer, watering_durability_cost: integer, harvesting_durability_cost: integer, time_per_growth_cycle: integer)
Link copied to clipboard
@mount("farming.update_state")
operation update_state(farming_plot_action_dto: farming_plot_action_dto, account_id: byte_array, auth_descriptor_id: byte_array)